#pragma once

#include <QDialog>
#include <QColor>
#include <QGraphicsDropShadowEffect>

class BaseShadowDialog : public QDialog
{
    Q_OBJECT
public:
    explicit BaseShadowDialog(QWidget *parent = nullptr);
    virtual ~BaseShadowDialog();

    void setMainWidget(QWidget *widget);

    void removeMainWidget(QWidget *widget);

    void setTitleHeight(int height);

    void moveCenter();
    
    void setShadowRadius(int radius = 4);
    
    void setShadowSize(QPointF size = QPointF(5,5));
    
    void setShadowColor(QColor color = Qt::black);

protected:
    void focusOutEvent(QFocusEvent* event) override;

signals:
    void sigFocusOut();
private:
    QRect m_rect;
    int m_height;
    QGraphicsDropShadowEffect *m_shadow = nullptr;
};

